import React, { Component } from 'react'
import './index.less'
import { Table,Row,Col,Input,Button} from 'antd';
const Search = Input.Search;

export default class PersonalReward extends Component {
  state = {
    data: [{
      key: '1',
      name: '劫后余生',
      describe:"18年由四川斐讯转签为上海斐讯",
      time: '2018-9-13',
    }, {
      key: '2',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    }, {
      key: '3',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '4',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '5',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '6',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '7',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '8',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '9',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '10',
      name: 'lingchao.zhou',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      time: '2018-9-13',
    },{
      key: '11',
      describe:"恭喜获得了考评期，恭喜转正恭喜获得了考评期，恭喜转正",
      name: 'lingchao.zhou',
      number: '2018年9月第2周',
      time: '2018-9-13',
    }]
  }
  goBack = () => {
    this.props.history.goBack();
  }
  render() {
    const columns = [{
      title: '名称',
      dataIndex: 'name',
      key: 'name',
    }, {
      title: '描述',
      dataIndex: 'describe',
      key: 'number',
    }];
    return (
      <section className="base-section">
       <Row className="top-row">
            <Col span={19}>
              <Button className="create-button" type="primary" onClick={this.goBack}>返回</Button>
            </Col>
            <Col span={5} type="flex" justify="center">
              <Search placeholder="请输入搜索内容" className="search" onSearch={value => console.log(value)}/>
            </Col>
          </Row>
          <Row>
            <Table columns={columns} dataSource={this.state.data} pagination={{defaultPageSize: 10, showSizeChanger: true}} />
          </Row>
      </section>
      

    )
  }
}
